.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.5s ease;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* 表单切换按钮 */
.form-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007bff;
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tab-btn.active {
    color: #007bff;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

/* 表单样式 */
.form {
    display: none;
}

.form.active {
    display: block;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007bff;
    outline: none;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 按钮样式 */
.login-btn,
.register-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover,
.register-btn:hover {
    background: #0056b3;
}

/* 表单底部 */
.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 2px;
    background: #eee;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.strength-weak { width: 33.33%; background: #e74c3c; }
.strength-medium { width: 66.66%; background: #f1c40f; }
.strength-strong { width: 100%; background: #2ecc71; }

/* 加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }

    .form-tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
    }
}

.error-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
}

.form-group.error input {
    border-color: #dc3545;
}

.form-group.success input {
    border-color: #28a745;
}